//
//  PKPlayerManager.h
//  AVPlayer
//
//  Created by lanou on 15/10/5.
//  Copyright (c) 2015年 李伟伟. All rights reserved.
//

#import <Foundation/Foundation.h>


typedef NS_ENUM(NSInteger, PlayType) {
//单曲循环
    PlayTypeSingle,
//列表循环
    PlayTypeList,
//随机播放
    PlayTypeRandom

};

@interface PKPlayerManager : NSObject
//@property(nonatomic, strong)NSMutableArray *musicArray;
//播放方式
@property(nonatomic, assign)PlayType playType;
//总时间
@property(nonatomic, assign, readonly)NSUInteger totalTime;

//当前时间
@property(nonatomic, assign, readonly)NSUInteger currentTime;


//单例
+(instancetype)sharedManager;

//外界传进来要播放的音乐 用数组接收
-(void)setManagerMusicArray:(NSArray *)array;

//上一首
-(void)lastOne;

//下一首
-(void)nextOne;

//播放/暂停
-(void)pauseAndPlay;

//跳转时间
-(void)goToTime:(NSUInteger)time;

//停止
-(void)stop;
//根据外界传过来的下标播放
-(void)playWithIndex:(NSInteger)index;


@end
